package com.wang.springbootinit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wang.springbootinit.model.entity.AnswerRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface AnswerRecordMapper extends BaseMapper<AnswerRecord> {

    Page<AnswerRecord> getStudentQuestionPage(Page<AnswerRecord> page,
        @Param("studentId") Long studentId,
        @Param("chapterId") Long chapterId,
        @Param("questionType") Integer questionType,
        @Param("questionCategory") Integer questionCategory);

    Page<AnswerRecord> getStudentErrorQuestionPage(Page<AnswerRecord> page,
                                                   @Param("studentId")Long studentId,
                                                   @Param("chapterId")Long chapterId,
                                                   @Param("questionType")Integer questionType,
                                                   @Param("questionCategory")Integer questionCategory);
}